//
//  BaseModel.m
//  quickBatchManager
//
//  Created by 王定波 on 15/9/15.
//  Copyright (c) 2015年 jack. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel


+(NSString*)DataTOjsonString:(id)object
{
    NSString *jsonString = nil;
    NSError *error;
    NSData *jsonData = [NSJSONSerialization dataWithJSONObject:object
                                                       options:nil // Pass 0 if you don't care about the readability of the generated string
                                                         error:&error];
    if (! jsonData) {
        NSLog(@"Got an error: %@", error);
    } else {
        jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
    }
    
    
    jsonString = [jsonString stringByReplacingOccurrencesOfString:@"\"" withString:@"'"];
    return jsonString;
}
@end
